Get My Offers
This API is used to retrieve a list of all customer offers that the parent customer attached to a given customer (identified by “customer/{id}” in the URL below).
|
HTTP URL |
|
|---|---|
|
GET |
/api/v2/customer/{id}/offer/my-offers |
Eligibility
The Requester is eligible to request information on individual offers, which were assigned to him by his parent customer.
API Request
Request Structure
This API has no request structure.
API Response
Response Structure
|
Parameter |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
errorCode |
String |
O |
Failure code. |
|
errorMessage |
String |
O |
Failure message. |
|
content |
Object |
O |
Array of main response body object displayed when an API call was successful. For a failure, it will be empty. |
|
pageable |
Object |
O |
Paging information object displayed when an API call was successful. For a failure, it will be empty. |
Content data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
id |
UUID |
M |
Offer ID |
|
name |
String |
M |
Offer name |
|
description |
String |
O |
Offer description |
|
type |
String |
M |
Individual offer type. ENUM: RATE, MONEY, USAGE, POOL |
|
creationTime |
DateTime |
M |
Offer creation timestamp |
|
expirationTime |
DateTime |
O |
Offer expiration time |
|
renewalInterval |
String |
M |
Renewal period interval. ENUM valid values: DAILY, WEEKLY, MONTHLY, QUARTERLY, SEMI_ANNUALLY, ANNUALLY, ONE_TIME |
|
isProrated |
Boolean |
M |
Plan proration.
A Pool plan is always False. |
| isIncludingAccessFee |
Boolean |
M |
Specifies if the offer price already includes inherent access fee and surcharge fee.
|
|
money |
Object |
CM |
Money type object.
|
|
rate |
Object |
O |
Rate typeobject.
|
|
usage |
Object |
CM |
Usage type object.
|
|
pool |
Object |
CM |
Pool plan type object.
|
Money data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
value |
Decimal |
M |
Offer monetary value |
|
currency |
String |
M |
Offer currency, for example, USD, GBP, EUR |
|
activationType |
String |
M |
Displays plan activation behavior. Valid values: REGULAR FIRST_EVENT_PERIODIC FIRST_EVENT_NON_PERIODIC |
Rate data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
dataLimit |
Decimal |
O |
Displays the maximal allowed DATA usage consumption. |
|
dataLimitUnitType |
String |
CM |
Data limit unit type. Valid values: KB MB GB Populated when data limit exists. |
|
smsLimit |
Decimal |
O |
Displays the maximal allowed SMS usage consumption. Unit counting is always a ‘unit’. |
Usage data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
cost |
Decimal |
M |
Cost of the offer |
|
currency |
String |
M |
Offer currency, for example, USD, GBP, EUR |
|
activationType |
String |
M |
Displays plan activation behavior. Valid values: REGULAR FIRST_EVENT_PERIODIC FIRST_EVENT_NON_PERIODIC |
|
offerDepletion |
Boolean |
CM |
Rater behavior when offer allowances have been depleted. True = Charging will continue according to offer rate False = Charging will be blocked |
|
usageType |
Object |
M |
Array of usage types object. |
Usage Type data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
type |
String |
M |
Type of the usage. Valid values: DATA, SMS |
|
value |
Decimal |
M |
Overall allowance value when regular offer or pool plan of type FIXED. Allowance value per every added subscriber when pool plan and its type is ACCUMULATIVE. Data consumption for DATA type. Unit counting for SMS type. |
|
unitType |
String |
CM |
Usage unit type. DATA related valid values: KB, MB, GB. Populate d when usage type is set to DATA. |
|
limitValue |
Decimal |
O |
Displays usage limit value Data consumption for DATA type. Unit counting for SMS type. |
|
limitUnitType |
String |
CM |
Data limit unit type. Valid values: KB, MB, GB Populated when setting limit for DATA usage only. |
Pool data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
type |
String |
M |
Pool plan type. Valid values: FIXED, ACCUMULATIVE |
|
cost |
Decimal |
M |
Cost of the offer when type value is FIXED. Cost that will be added per every added subscriber when type is ACCUMULATIVE |
|
currency |
String |
M |
Offer currency, for example, USD, GBP, EUR |
|
activationType |
String |
M |
Displays plan activation behavior. Valid values: REGULAR FIRST_EVENT_PERIODIC FIRST_EVENT_NON_PERIODIC |
|
usageType |
Object |
M |
Array of usage types object. |
Pageable data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
page |
Numeric |
M |
Page number |
|
size |
Numeric |
M |
Page size. Number of requested elements per page |
|
totalPages |
Numeric |
M |
Total amount of available pages per requested page size |
|
totalElements |
Numeric |
M |
Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible.
|
Code |
Message |
|---|---|
|
CUSTOMER_1002 |
Customer does not exist |
|
CUSTOMER_1006 |
Failed to retrieve customer details |
|
GLOBAL_1001 |
Service unavailable. Please try again |
Examples
Request Body
{
}
Response Body: Regular Plan (Money) Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "roaming",
"description": "roaming bundle",
"type": "MONEY",
"creationTime": "2020-07-01T00:00:00.977Z",
"expirationTime": "2020-07-31T00:59:09.977Z",
"renewalInterval": "MONTHLY",
"isProrated": true,
"isIncludingAccessFee": false,
"availabilityZone": [
{
"id": "1b15048b-1ed4-4d34-a074-c7e26520e12a",
"name": "North America 05"
}
],
"money": [
{
"value": 300,
"currency": "USD",
"activationType": "REGULAR"
}
]
},
{
"id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
"name": "regular",
"description": "regular bundle",
"type": "MONEY",
"creationTime": "2020-07-01T00:00:00.977Z",
"expirationTime": "2020-07-31T00:59:09.977Z",
"renewalInterval": "MONTHLY",
"isProrated": true,
"availabilityZone": [],
"money": [
{
"value": 100,
"currency": "GBP",
"activationType": "REGULAR"
}
]
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
Response Body: Pool Plan Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "family 50GB+",
"description": "family bundle",
"type": "POOL",
"creationTime": "2020-07-01T00:00:00.977Z",
"expirationTime": "2020-07-31T00:59:09.977Z",
"renewalInterval": "MONTHLY",
"isProrated": false,
"isIncludingAccessFee": false,
"availabilityZone": [
{
"id": "1b15048b-1ed4-4d34-a074-c7e26520e12a",
"name": "North America 05"
}
],
"pool": [
{
"type": "FIXED",
"cost": 15,
"currency": "USD",
"activationType": "REGULAR",
"usageType": [
{
"type": "DATA",
"value": 50,
"unitType": "GB",
"limitValue": 20,
"limitUnitType": "GB"
},
{
"type": "SMS",
"value": 100,
"unitType": "",
"limitValue": 10,
"limitUnitType": ""
}
]
}
]
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
Response Body: Failure NAK
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}